package com.atguigu.educms.controller;

import com.atguigu.commonutils.result.R;
import com.atguigu.educms.EduCmsApplication;
import com.atguigu.educms.entity.Banner;
import com.atguigu.educms.service.BannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author kabuda
 * @create 2023-05-11 20:04
 */
@RestController
@RequestMapping("educms/banner/client")
public class BannerClientController {
    @Autowired
    private BannerService bannerService;

    @GetMapping("list")
    public R list(){
        List<Banner> list = bannerService.bannerList();
        return R.ok().data("list",list);
    }
}
